/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.res0w.SMMS.ui.admin.MenuList;

import com.res0w.SMMS.ui.UDResource.ImageButton;
import com.res0w.SMMS.ui.UDResource.ListMenuWindow;
import com.res0w.SMMS.ui.admin.AdminMainPanel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 *
 * @author res0w
 * @version 0.1
 * @since 2009-10-3
 */
public class GamingListMenu extends ListMenuWindow{

     private AdminMainPanel parentPanel;

    public GamingListMenu(AdminMainPanel parentPanel) {
        super(parentPanel);

        this.parentPanel = parentPanel;
        this.pack();
    }

    @Override
    public void btnInit() {
//        throw new UnsupportedOperationException("Not supported yet.");
        ImageButton rollCall = new ImageButton(
                "/com/res0w/SMMS/ui/UDResource/rollCall_d.png",
                "/com/res0w/SMMS/ui/UDResource/rollCall_h.png",
                "/com/res0w/SMMS/ui/UDResource/rollCall_s.png");
        super.panel.setButtonLocation(rollCall, 0, 6);
        rollCall.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                setVisible(false);
                parentPanel.setSubPanelVisible(false);
                parentPanel.grcp.setVisible(true);
            }
        });

        ImageButton resultInput = new ImageButton(
                "/com/res0w/SMMS/ui/UDResource/resultInput_d.png",
                "/com/res0w/SMMS/ui/UDResource/resultInput_h.png",
                "/com/res0w/SMMS/ui/UDResource/resultInput_s.png");
        super.panel.setButtonLocation(resultInput, 0, 42);
        resultInput.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                setVisible(false);
                parentPanel.setSubPanelVisible(false);
                parentPanel.grip.setVisible(true);
            }
        });
    }

}
